<template>
  <div class="location-info">
    <span>您现在的位置：</span>
    <span>{{ location }}</span>
  </div>
</template>
<script>
export default {
  name: "current-location",
  data() {
    return {
      location: "",
      routeMap: {
        "/bid-notice": {
          name: "招标公告",
          children: []
        },
        "/subject-activity": {
          name: "专题活动",
          children: []
        },
        "/policy-laws": {
          name: "政策法规",
          children: []
        },
        "/news-information": {
          name: "新闻资讯",
          children: []
        },
        "/industry-trends": {
          name: "行业动态",
          children: []
        },
        "/brand-list": {
          name: "品牌榜单",
          children: []
        },
        "/company-publicity": {
          name: "企业公示",
          children: []
        },
        "/value-service": {
          name: "增值服务",
          children: []
        },
        "/vr-exhibition": {
          name: "VR展厅",
          children: []
        },
        "/meet-exhibition": {
          name: "会议展厅",
          children: []
        },
        "/about-us": {
          name: "关于我们",
          children: []
        }
      }
    };
  },
  mounted() {
    this.initCurLocation();
  },
  methods: {
    initCurLocation() {
      //   console.log(this.$route);
      //   console.log(this.$router);
      if (this.routeMap[this.$route.path]) {
        let routeInfo = this.routeMap[this.$route.path];
        this.location = routeInfo.name;
      }
    }
  }
};
</script>
<style scoped>
.location-info {
  font-size: 0.14rem;
}
</style>
